home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Panasonic- / funcity / tokyo / flagirl.dcr / 00001_movie script.ls next >
Encoding:
Text File  |  2017-09-21  |  7.3 KB  |  299 lines

  1. global oncursor, handcursor, catchcursor, girlobjlist, lingobj, getlinggirlnum, userid, userpw, userpg, userpm, jumpmoviename, jumpmode, trylingcount, lasteventtime
  2.  
  3. on startMovie
  4.   set oncursor to [the number of cast "onCursor", the number of cast "onCursor" + 1]
  5.   set handcursor to [the number of cast "handCursor", the number of cast "handCursor" + 1]
  6.   set catchcursor to [the number of cast "catchCursor", the number of cast "catchCursor" + 1]
  7.   set getlinggirlnum to 0
  8.   set trylingcount to 0
  9.   set girlobjlist to EMPTY
  10.   if not voidp(userid) then
  11.     put userid into field "userID"
  12.   end if
  13.   put field "addInfoText1" into field "addInfo"
  14.   set lasteventtime to the ticks
  15.   resetcursor()
  16. end
  17.  
  18. on stopMovie
  19.   put "guest" into field "userID"
  20.   put 0 into field "point"
  21.   put 0 into field "label"
  22. end
  23.  
  24. on allpuppetoff
  25.   repeat with s = 1 to 48
  26.     set the puppet of sprite s to 0
  27.     set the cursor of sprite s to 0
  28.   end repeat
  29.   sound stop 2
  30. end
  31.  
  32. on gameback
  33.   if (the ticks - lasteventtime) > 15 then
  34.     if the frame >= label("check") then
  35.       resetcursor()
  36.       allpuppetoff()
  37.       go("loop")
  38.     else
  39.       if the frame >= label("help") then
  40.         if not listp(girlobjlist) then
  41.           resetcursor()
  42.           allpuppetoff()
  43.           go("loop")
  44.         else
  45.           set the puppet of sprite clickOn() to 0
  46.           go(label("game") + 1)
  47.           sethandcursor()
  48.         end if
  49.       else
  50.         if the frame >= label("game") then
  51.           resetcursor()
  52.           allpuppetoff()
  53.           go("loop")
  54.         else
  55.           jumpnetmovie("menu.dcr", 0)
  56.         end if
  57.       end if
  58.     end if
  59.   end if
  60.   set lasteventtime to the ticks
  61. end
  62.  
  63. on gamehelp
  64.   set the puppet of sprite clickOn() to 0
  65.   go("help")
  66. end
  67.  
  68. on gamequit
  69.   if (the ticks - lasteventtime) > 15 then
  70.     if the frame >= label("check") then
  71.       jumpnetmovie("menu.dcr", 0)
  72.     else
  73.       set the puppet of sprite clickOn() to 0
  74.       showscore()
  75.     end if
  76.   end if
  77.   set lasteventtime to the ticks
  78. end
  79.  
  80. on resetcursor
  81.   cursor(oncursor)
  82. end
  83.  
  84. on sethandcursor
  85.   repeat with s = 18 to 29
  86.     set the cursor of sprite s to handcursor
  87.   end repeat
  88. end
  89.  
  90. on resetgame
  91.   set getlinggirlnum to 0
  92.   set trylingcount to 0
  93.   set girlobjlist to []
  94.   add(girlobjlist, birth(script "girl script", 415, 78, 4))
  95.   add(girlobjlist, birth(script "girl script", 415, 169, 5))
  96.   add(girlobjlist, birth(script "girl script", 415, 260, 6))
  97.   set lingobj to EMPTY
  98.   sethandcursor()
  99. end
  100.  
  101. on dogame
  102.   dragling()
  103.   randomchangegirl()
  104.   rolloverbtn()
  105. end
  106.  
  107. on showscore
  108.   put getlinggirlnum into char 12 of userpm
  109.   if getlinggirlnum = 9 then
  110.     put 100 into field "label"
  111.     put 90 into field "point"
  112.     put field "addInfoText2" into field "addInfo"
  113.     repeat with l = 1 to count(girlobjlist)
  114.       setloopgirl(getAt(girlobjlist, l))
  115.     end repeat
  116.   else
  117.     put integer(getlinggirlnum * 10) into field "label"
  118.     put integer(getlinggirlnum * 10) into field "point"
  119.     put field "addInfoText1" into field "addInfo"
  120.     repeat with l = 1 to count(girlobjlist)
  121.       setdegirl(getAt(girlobjlist, l))
  122.     end repeat
  123.   end if
  124.   go("check")
  125. end
  126.  
  127. on jumpnetmovie mname, jmode
  128.   sound stop 2
  129.   set jumpmoviename to mname
  130.   set jumpmode to jmode
  131.   if userid = "guest" then
  132.     set jumpmode to 1
  133.   end if
  134.   repeat with s = 1 to 48
  135.     set the puppet of sprite s to 0
  136.   end repeat
  137.   if jumpmode then
  138.     gotonetmovie(mname)
  139.   else
  140.     setuserpm()
  141.   end if
  142.   go("move")
  143. end
  144.  
  145. on setuserpm
  146.   getnettext("http://202.224.191.2/cgi-bin/EcOpe.cgi?name=" & userid & "&password=" & userpw & "&amount=" & userpg & "¶meter=" & userpm)
  147. end
  148.  
  149. on checknetresult
  150.   if jumpmode then
  151.     exit
  152.   end if
  153.   if netdone() then
  154.     set nresult to nettextresult()
  155.     if nresult starts "<" then
  156.       alert(deletetag(nresult))
  157.       go("loop")
  158.       abort()
  159.     else
  160.       if nresult starts "E000" then
  161.         if line 1 of nresult = "E0000" then
  162.           set rtext to "Error : Server System Error"
  163.         else
  164.           if line 1 of nresult = "E0001" then
  165.             set rtext to "Error : " & userid & "The name is not registered."
  166.           else
  167.             if line 1 of nresult = "E0002" then
  168.               set rtext to "Error : The password is wrong."
  169.             else
  170.               if line 1 of nresult = "E0003" then
  171.                 set rtext to "Error : The parameter's form is wrong."
  172.               else
  173.                 if line 1 of nresult = "E0003" then
  174.                   set rtext to "Error : Your balance is short - you cannot make a withdrawal."
  175.                 end if
  176.               end if
  177.             end if
  178.           end if
  179.         end if
  180.         alert(rtext)
  181.         go("loop")
  182.         abort()
  183.       else
  184.         set jumpmode to 1
  185.         gotonetmovie(jumpmoviename)
  186.       end if
  187.     end if
  188.   end if
  189. end
  190.  
  191. on deletetag ctext
  192.   repeat while ctext contains "<"
  193.     set fchar to offset("<", ctext)
  194.     set echar to offset(">", ctext)
  195.     delete char fchar to echar of ctext
  196.   end repeat
  197.   return ctext
  198. end
  199.  
  200. on rolloverbtn
  201.   set rcnum to the mouseCast
  202.   if rcnum > 0 then
  203.     set rcname to string(the name of cast rcnum)
  204.     if item 2 of rcname = "off" then
  205.       repeat with s = 41 to 43
  206.         if the castNum of sprite s = rcnum then
  207.           set the puppet of sprite s to 1
  208.           set the castNum of sprite s to rcnum + 1
  209.           next repeat
  210.         end if
  211.         set the puppet of sprite s to 0
  212.       end repeat
  213.     else
  214.       if item 2 of rcname = "on" then
  215.         repeat with s = 41 to 43
  216.           if the castNum of sprite s = rcnum then
  217.             if the mouseDown and (clickOn() = s) then
  218.               set the castNum of sprite s to rcnum + 1
  219.               updateStage()
  220.               do(item 1 of rcname)
  221.             end if
  222.           end if
  223.         end repeat
  224.       else
  225.         if item 2 of rcname = "click" then
  226.           repeat with s = 41 to 43
  227.             if the castNum of sprite s = rcnum then
  228.               if the mouseUp then
  229.                 set the castNum of sprite s to rcnum - 1
  230.                 next repeat
  231.               end if
  232.               do(item 1 of rcname)
  233.             end if
  234.           end repeat
  235.         else
  236.           repeat with s = 41 to 43
  237.             set the puppet of sprite s to 0
  238.           end repeat
  239.         end if
  240.       end if
  241.     end if
  242.   else
  243.     repeat with s = 41 to 43
  244.       set the puppet of sprite s to 0
  245.     end repeat
  246.   end if
  247. end
  248.  
  249. on getling
  250.   set glnum to clickOn()
  251.   if (glnum < 18) or (glnum > 29) then
  252.     exit
  253.   end if
  254.   if not rollOver(glnum) then
  255.     exit
  256.   end if
  257.   set lingobj to birth(script "ling script", the mouseH, the mouseV, glnum)
  258.   cursor(catchcursor)
  259.   set the cursor of sprite glnum to catchcursor
  260. end
  261.  
  262. on randomchangegirl
  263.   set bgmmode to 0
  264.   repeat with l = 1 to count(girlobjlist)
  265.     changegirl(getAt(girlobjlist, l))
  266.     if the castNum of sprite (l + 3) = the number of cast "g_ling.loop" then
  267.       set bgmmode to 1
  268.     end if
  269.   end repeat
  270.   if not bgmmode then
  271.     sound stop 2
  272.   end if
  273. end
  274.  
  275. on dragling
  276.   if not objectp(lingobj) then
  277.     if the mouseDown then
  278.       getling()
  279.     else
  280.       resetcursor()
  281.       sethandcursor()
  282.     end if
  283.   else
  284.     if the mouseDown and (the flymode of lingobj = 0) then
  285.       lingmove(lingobj)
  286.     else
  287.       resetcursor()
  288.       sethandcursor()
  289.       if ((the mouseH < 101) or (the mouseH > 159)) and (the flymode of lingobj = 0) then
  290.         set the puppet of sprite the snum of lingobj to 0
  291.         set lingobj to EMPTY
  292.       else
  293.         setlingflymode(lingobj)
  294.         flyling(lingobj)
  295.       end if
  296.     end if
  297.   end if
  298. end
  299.